<template>
	<!-- 公告详情 -->
	<view class="item-box">
		<view class="notice-box" v-for="v in notice" :key="v.id">
			<view class="item-text">
				<text class="txtOne">{{v.noticeTitle}}</text>
			</view>
			<view class="item-txt">
				<text>{{v.authorName}}</text>
				<text>{{v.date}}</text>
			</view>
			<view class="item-textOne">
				<view class="">
					<text>时间:</text>
					<text>{{v.date}}</text>
				</view>

			</view>
			<view class="item-textTwo">
				<text>内容：{{v.urgencyName}}</text>
			</view>
		</view>


	</view>
</template>

<script>
	import {
		http
	} from "../../utils/http.js"
	export default {
		data() {
			return {
				notice: [],
				title: "",
			};
		},
		methods: {
			getData() {
				http({
					url: "/communityAnnouncement/list",
					method: "get",
				}).then((res) => {
					// console.log(res)
					if (res.code == 0) {
						this.notice = res.data;
					} else {
						console.log("数据接收失败")
					}

				})
			}

		},
		onLoad() {
			this.getData();
		},
	}
</script>

<style>
	.notice-box {
		border-bottom: 1px solid #b8b8b8;
		padding: 20px;
	}

	text {
		margin: 10rpx;
	}

	.txtOne {
		font-size: 36rpx;
	}

	.item-txt {
		font-size: 28rpx;
		color: #b8b8b8;
		margin-top: 20rpx;
	}

	.item-text {
		margin-top: 20rpx;
	}

	.item-textOne {
		margin-top: 30rpx;
	}

	.item-textTwo {
		margin-top: 50rpx;
		margin-left: 10rpx;
	}
</style>
